/*
 * Selling Partner API for Listings Items
 *
 * The Selling Partner API for Listings Items (Listings Items API) provides programmatic access to selling partner listings on Amazon. Use this API in collaboration with the Selling Partner API for Product Type Definitions, which you use to retrieve the information about Amazon product types needed to use the Listings Items API.  For more information, see the [Listings Items API Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/listings-items-api-v2021-08-01-use-case-guide).
 *
 * The version of the OpenAPI document: 2021-08-01
 * Generated by: https://github.com/openapitools/openapi-generator.git
 */


using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.IO;
using System.Runtime.Serialization;
using System.Text;
using System.Text.RegularExpressions;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;
using System.ComponentModel.DataAnnotations;
using OpenAPIDateConverter = software.amzn.spapi.Client.OpenAPIDateConverter;

namespace software.amzn.spapi.Model.listings.items.v2021_08_01
{
    /// <summary>
    /// Response containing the results of a submission to the Selling Partner API for Listings Items.
    /// </summary>
    [DataContract(Name = "ListingsItemSubmissionResponse")]
    public partial class ListingsItemSubmissionResponse : IValidatableObject
    {
        /// <summary>
        /// The status of the listings item submission.
        /// </summary>
        /// <value>The status of the listings item submission.</value>
        [JsonConverter(typeof(StringEnumConverter))]
        public enum StatusEnum
        {
            /// <summary>
            /// Enum ACCEPTED for value: ACCEPTED
            /// </summary>
            [EnumMember(Value = "ACCEPTED")]
            ACCEPTED = 1,

            /// <summary>
            /// Enum INVALID for value: INVALID
            /// </summary>
            [EnumMember(Value = "INVALID")]
            INVALID = 2,

            /// <summary>
            /// Enum VALID for value: VALID
            /// </summary>
            [EnumMember(Value = "VALID")]
            VALID = 3
        }


        /// <summary>
        /// The status of the listings item submission.
        /// </summary>
        /// <value>The status of the listings item submission.</value>
        [DataMember(Name = "status", IsRequired = true, EmitDefaultValue = true)]
        public StatusEnum Status { get; set; }
        /// <summary>
        /// Initializes a new instance of the <see cref="ListingsItemSubmissionResponse" /> class.
        /// </summary>
        [JsonConstructorAttribute]
        protected ListingsItemSubmissionResponse() { }
        /// <summary>
        /// Initializes a new instance of the <see cref="ListingsItemSubmissionResponse" /> class.
        /// </summary>
        /// <param name="sku">A selling partner provided identifier for an Amazon listing. (required).</param>
        /// <param name="status">The status of the listings item submission. (required).</param>
        /// <param name="submissionId">The unique identifier of the listings item submission. (required).</param>
        /// <param name="issues">Listings item issues related to the listings item submission..</param>
        /// <param name="identifiers">Identity attributes associated with the item in the Amazon catalog, such as the ASIN..</param>
        public ListingsItemSubmissionResponse(string sku = default(string), StatusEnum status = default(StatusEnum), string submissionId = default(string), List<Issue> issues = default(List<Issue>), List<ItemIdentifiersByMarketplace> identifiers = default(List<ItemIdentifiersByMarketplace>))
        {
            // to ensure "sku" is required (not null)
            if (sku == null)
            {
                throw new ArgumentNullException("sku is a required property for ListingsItemSubmissionResponse and cannot be null");
            }
            this.Sku = sku;
            this.Status = status;
            // to ensure "submissionId" is required (not null)
            if (submissionId == null)
            {
                throw new ArgumentNullException("submissionId is a required property for ListingsItemSubmissionResponse and cannot be null");
            }
            this.SubmissionId = submissionId;
            this.Issues = issues;
            this.Identifiers = identifiers;
        }

        /// <summary>
        /// A selling partner provided identifier for an Amazon listing.
        /// </summary>
        /// <value>A selling partner provided identifier for an Amazon listing.</value>
        [DataMember(Name = "sku", IsRequired = true, EmitDefaultValue = true)]
        public string Sku { get; set; }

        /// <summary>
        /// The unique identifier of the listings item submission.
        /// </summary>
        /// <value>The unique identifier of the listings item submission.</value>
        [DataMember(Name = "submissionId", IsRequired = true, EmitDefaultValue = true)]
        public string SubmissionId { get; set; }

        /// <summary>
        /// Listings item issues related to the listings item submission.
        /// </summary>
        /// <value>Listings item issues related to the listings item submission.</value>
        [DataMember(Name = "issues", EmitDefaultValue = false)]
        public List<Issue> Issues { get; set; }

        /// <summary>
        /// Identity attributes associated with the item in the Amazon catalog, such as the ASIN.
        /// </summary>
        /// <value>Identity attributes associated with the item in the Amazon catalog, such as the ASIN.</value>
        [DataMember(Name = "identifiers", EmitDefaultValue = false)]
        public List<ItemIdentifiersByMarketplace> Identifiers { get; set; }

        /// <summary>
        /// Returns the string presentation of the object
        /// </summary>
        /// <returns>String presentation of the object</returns>
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();
            sb.Append("class ListingsItemSubmissionResponse {\n");
            sb.Append("  Sku: ").Append(Sku).Append("\n");
            sb.Append("  Status: ").Append(Status).Append("\n");
            sb.Append("  SubmissionId: ").Append(SubmissionId).Append("\n");
            sb.Append("  Issues: ").Append(Issues).Append("\n");
            sb.Append("  Identifiers: ").Append(Identifiers).Append("\n");
            sb.Append("}\n");
            return sb.ToString();
        }

        /// <summary>
        /// Returns the JSON string presentation of the object
        /// </summary>
        /// <returns>JSON string presentation of the object</returns>
        public virtual string ToJson()
        {
            return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
        }

        /// <summary>
        /// To validate all properties of the instance
        /// </summary>
        /// <param name="validationContext">Validation context</param>
        /// <returns>Validation Result</returns>
        IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
        {
            yield break;
        }
    }

}
